import { defHttp } from '@/utils/http/axios'

// 查询excel导入记录列表
export function getImportHistoryPage(params) {
  return defHttp.get({ url: '/wages/import-history/page', params })
}

// 查询excel导入记录详情
export function getImportHistory(id: number) {
  return defHttp.get({ url: `/wages/import-history/get?id=${id}` })
}

// 新增excel导入记录
export function createImportHistory(data) {
  return defHttp.post({ url: '/wages/import-history/create', data })
}

// 修改excel导入记录
export function updateImportHistory(data) {
  return defHttp.put({ url: '/wages/import-history/update', data })
}

// 删除excel导入记录
export function deleteImportHistory(id: number) {
  return defHttp.delete({ url: `/wages/import-history/delete?id=${id}` })
}

// 导出excel导入记录 Excel
export function exportImportHistory(params) {
  return defHttp.download({ url: '/wages/import-history/export-excel', params }, 'excel导入记录.xls')
}